package top.yzhelp.enjoyinformation;

import io.github.yedaxia.apidocs.Docs;
import io.github.yedaxia.apidocs.DocsConfig;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 码之泪殇 GitHub: https://github.com/gongsir0630
 * @date 2021/3/26 14:28
 * 你的指尖,拥有改变世界的力量
 * @description 生成api-docs
 */
@Slf4j
public class GenerateDoc {
    public static void main(String[] args) {
        // 获取当前项目根路径
        String projectPath = System.getProperty("user.dir");
        log.info(projectPath);
        DocsConfig config = new DocsConfig();
        config.setProjectPath(projectPath);
        config.setProjectName("enjoy-information");
        config.setApiVersion("V1.0");
        config.setDocsPath(projectPath+"/docs");
        config.setAutoGenerate(Boolean.TRUE);
        Docs.buildHtmlDocs(config);
    }
}
